<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<meta http-equiv="X-UA-Compatible" content="IE=edge">
	<meta name="viewport" content="width=device-width, initial-scale=1">
	<title>抢课系统</title>
	<link rel="stylesheet" href="Css/bootstrap.min.css">
	<link rel="stylesheet" href="Css/login.css">
</head>
<body>
	<div class="container">
	<div class="row clearfix" id="header">
			<div class="col-md-12 column">
				<h3 class="text-center">
					川大学生抢课系统
				</h3>
			</div>
		</div>
		<div class="row clearfix">
			<div class="col-md-4 column">
			</div>
			<div class="col-md-4 column">
				<form class="form-horizontal" role="form" id="form-login" action="#" method="post">
					<div class="form-group">
						<label for="studentnumber" class="col-sm-2 control-label">学号</label>
						<div class="col-sm-10">
							<input type="text" class="form-control" id="studentnumber" name="studentnumber" />
						</div>
					</div>
					<div class="form-group">
						<label for="password" class="col-sm-2 control-label">密码</label>
						<div class="col-sm-10">
							<input type="password" class="form-control" id="password" name="password" />
						</div>
					</div>
					<div class="form-group">
						<div class="col-sm-offset-2 col-sm-10">
							<button type="button" class="btn btn-default" id="btn-login">登录</button>
						</div>
					</div>
				</form>
			</div>
			<div class="col-md-4 column">
			</div>
		</div>
	</div>

	<script src="Js/jquery.min.js"></script>
	<script src="Js/bootstrap.min.js"></script>

	<script>
	$(document).ready(function() {
		$('#btn-login').click(function() {
			/* Act on the event */
			$studentnumber	=	$('#studentnumber').val();
			$password	=	$('#password').val();
			if(!$studentnumber){
				alert('请输入用户名！');
				return;
			}
			if(!$password){
				alert('请输入密码！');
				return;
			}
			$param = $('#form-login').serialize();
			$action = "http://127.0.0.1:8080/scucource/scucorse/core/user";
			$.post($action, $param, function(data) {
				/*optional stuff to do after success */
				console.log(data);
				console.log('1');
			});
		});
	});
	</script>
</body>
</html>